<!DOCTYPE html>
<#assign base=request.contextPath />
<html>
<head>
  <base href="${base}">
  <meta charset="utf-8">
  <title>在线考试系统</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="${base}/layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="${base}/css/global.css" media="all">
  <link rel="stylesheet" href="${base}/css/style.css" media="all">
  <style>
  .flex {
  		display: flex;
  		justify-content: center;
  }
  </style>
</head>

<body class="layui-layout-body">
<div class="alone-banner">
  <div class="layui-main">
    <h1>在线考试系统</h1>
    <p class="layui-hide-xs">新疆大学软件学院</p>
  </div>
</div>

<div class="layui-main alone-items">
	<fieldset class="layui-elem-field layui-field-title">
    	<legend>${currUser.fullname}</legend>
  	</fieldset>
  
	<div class="layui-row layui-col-space20 flex">
		<#list list as exam>
		<div class="layui-col-md4 layui-col-sm6">
			<div class="alone-version-desc layui-text">
				<h2>${exam.courseType.itemValue}</h2>
				<p>
					<span class="alone-badge">${exam.name}</span>
				</p>
				<ul>
					<li style="color: #FF5722;">${exam.examDate}</li>
					<li style="color: #FF5722;">${exam.note!}</li>
					<li style="color: #FF5722;"><strong>诚信考试，从我做起！</strong></li>
				</ul>
				<div class="alone-buy layui-btn-container">
					<#if exam.status==0>
						<a href="javascript:void(0)" class="layui-btn layui-btn-disabled">考试未开始</a>
					<#elseif exam.status==2>
						<a href="javascript:void(0)" class="layui-btn layui-btn-disabled">考试已结束</a>
					<#else>
						<a href="${base}/exam/student/exam?examId=${exam.oid}" class="layui-btn">开始考试</a>
					</#if>
				</div>
			</div>
		</div>
		</#list>
		
	</div>
</div>

<script src="${base}/layuiadmin/layui/layui.js"></script>
<script>
  	layui.use(['layer'], function() {
  		<#if msg??>
  		layer.alert('${msg}', {icon:2});
  		</#if>
  	});  	
</script>

</body>
</html>


